home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / DEF / Utilities / Array Primitives / make-array < prev    next >
Lisp/Scheme  |  1998-10-23  |  242b  |  17 lines

  1. make-array length
  2.  
  3. Returns an empty vector of a given length.
  4.  
  5. (setq vector (make-array 10))
  6. --> #(nil nil nil nil nil nil nil nil nil nil)
  7.  
  8. (putv vector 0 1)
  9. --> 1
  10.  
  11. (aref vector 0)
  12. --> 1
  13.  
  14. vector
  15. --> #(1 nil nil nil nil nil nil nil nil nil)
  16.  
  17.